<?php
defined('IN_MAIN') or exit('Invalid Access!');
    
function is_group_matrix_downline_of($uid, $upline_id){
 global $vars;
 $db=$vars["db"];
 $yes=false;
 if($uid && $upline_id){
  $id=$uid;
  do{
   $ref=@mysql_result(mysql_query("select matrix_upline from $db->users where id='$id'"), 0);
   if($ref!=$upline_id){
    $id=$ref;
   }else{
    $yes=true;
   }
  }while(!$yes && $id);
 }
 return $yes;
}
?>